<?php echo $this->fetch('header.html'); ?>
<div class="row">
<div class="span12">
<?php echo $this->fetch('shop/nav.html'); ?>
<div class="search-form">
<form method="get" action="<?php echo $this->_var['appadmin']; ?>" class="form">
<input type="hidden" name="m" value="shop" />

店铺名称：<input type="text" name="shopname" value="<?php echo $_GET['shopname']; ?>" />
分类：    <select name="catid" class="w100">
    <option value="0">请选择</option>
    <?php $_from = $this->_var['cat_list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
                <option value="<?php echo $this->_var['c']['catid']; ?>" <?php if (get ( 'catid' ) == $this->_var['c']['catid']): ?> selected="selected"<?php endif; ?>><?php echo $this->_var['c']['cname']; ?></option>
                <?php $_from = $this->_var['c']['child']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c_2');if (count($_from)):
    foreach ($_from AS $this->_var['c_2']):
?>
                	<option value="<?php echo $this->_var['c_2']['catid']; ?>" <?php if (get ( 'catid' ) == $this->_var['c_2']['catid']): ?> selected="selected"<?php endif; ?> class="o_c_2">|__<?php echo $this->_var['c_2']['cname']; ?></option>
                    <?php $_from = $this->_var['c_2']['child']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c_3');if (count($_from)):
    foreach ($_from AS $this->_var['c_3']):
?>
                    <option value="<?php echo $this->_var['c_3']['catid']; ?>" <?php if (get ( 'catid' ) == $this->_var['c_3']['catid']): ?> selected="selected"<?php endif; ?> class="o_c_3"> |____<?php echo $this->_var['c_3']['cname']; ?></option>
                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
    </select>
    <select name="status">
    	<option value="0">状态</option>
        <option value="1"  <?php if (1 == get ( 'status' )): ?> selected<?php endif; ?>>未审核</option>
        <option value="2"  <?php if (2 == get ( 'status' )): ?> selected<?php endif; ?>>已通过</option>
        <option value="3" <?php if (3 == get ( 'status' )): ?> selected<?php endif; ?>>已禁止</option>
    </select>
<input type="submit" value="搜索" class="btn" />
</form>
</div>
<p class="pd-5">总共<?php echo $this->_var['rscount']; ?>家店铺</p>
 <table class='table table-bordered' width='100%'>
  <tr>
   <td width="74">shopid</td>
   <td width="95">店铺名称</td>
   <td width="100">分类</td>
    <td width="97">logo</td>
   
    
   
   <td width="103">推荐</td>
   <td width="57">最新</td>
    <td width="51">最热</td>
   <td width="136">添加时间</td>
   
    
   <td width="60">状态</td>
<td   align="center">操作</td>
  </tr>
 <?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
<tr>
   <td><?php echo $this->_var['c']['shopid']; ?></td>
   <td><a href="/index.php?m=shop&shopid=<?php echo $this->_var['c']['shopid']; ?>" target="_blank"><?php echo $this->_var['c']['shopname']; ?></a></td> 
    <td align="center"><a href="<?php echo R("/index.php?m=shoplist&catid=".$this->_var["c"]["catid"]."");?>" target="_blank"><?php echo $this->_var['c']['cname']; ?><?php if ($this->_var['c']['cname_2nd']): ?>><?php echo $this->_var['c']['cname_2nd']; ?><?php endif; ?><?php if ($this->_var['c']['cname_3nd']): ?>><?php echo $this->_var['c']['cname_3nd']; ?><?php endif; ?></a></td>
 <td><a href="<?php echo $this->_var['c']['shopurl']; ?>" target="_blank"><img src="<?php echo IMAGES_SITE($this->_var['c']['logo']); ?>" width="50" /></a></td>
   
    
 
  
   <td><?php if ($this->_var['c']['isrecommend'] != 1): ?>
           <img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo $this->_var['appadmin']; ?>?m=shop&a=recommend&shopid=<?php echo $this->_var['c']['shopid']; ?>&isrecommend=1" rurl="<?php echo $this->_var['appadmin']; ?>?m=shop&a=recommend&shopid=<?php echo $this->_var['c']['shopid']; ?>&isrecommend=0" /> 
          <?php else: ?>
           <img src="/static/images/yes.gif" class="ajax_no"  rurl="<?php echo $this->_var['appadmin']; ?>?m=shop&a=recommend&shopid=<?php echo $this->_var['c']['shopid']; ?>&isrecommend=1" url="<?php echo $this->_var['appadmin']; ?>?m=shop&a=recommend&shopid=<?php echo $this->_var['c']['shopid']; ?>&isrecommend=0" /> 
          <?php endif; ?></td>
   <td><?php if ($this->_var['c']['isnew'] == 1): ?>
   <img src='<?php echo $this->_var['skins']; ?>images/yes.gif' class="ajax_no" url='<?php echo $this->_var['appadmin']; ?>?m=shop&a=new&shopid=<?php echo $this->_var['c']['shopid']; ?>&isnew=0' rurl='<?php echo $this->_var['appadmin']; ?>?m=shop&a=new&shopid=<?php echo $this->_var['c']['shopid']; ?>&isnew=1'>
    <?php else: ?>
    <img src='<?php echo $this->_var['skins']; ?>images/no.gif' class="ajax_yes" url='<?php echo $this->_var['appadmin']; ?>?m=shop&a=new&shopid=<?php echo $this->_var['c']['shopid']; ?>&isnew=1' rurl='<?php echo $this->_var['appadmin']; ?>?m=shop&a=new&shopid=<?php echo $this->_var['c']['shopid']; ?>&isnew=0'>
    <?php endif; ?></td>
    
    <td><?php if ($this->_var['c']['ishot'] == 1): ?>
   <img src='<?php echo $this->_var['skins']; ?>images/yes.gif' class="ajax_no" url='<?php echo $this->_var['appadmin']; ?>?m=shop&a=hot&shopid=<?php echo $this->_var['c']['shopid']; ?>&ishot=0' rurl='<?php echo $this->_var['appadmin']; ?>?m=shop&a=hot&shopid=<?php echo $this->_var['c']['shopid']; ?>&ishot=1'>
    <?php else: ?>
    <img src='<?php echo $this->_var['skins']; ?>images/no.gif' class="ajax_yes" url='<?php echo $this->_var['appadmin']; ?>?m=shop&a=hot&shopid=<?php echo $this->_var['c']['shopid']; ?>&ishot=1' rurl='<?php echo $this->_var['appadmin']; ?>?m=shop&a=hot&shopid=<?php echo $this->_var['c']['shopid']; ?>&ishot=0'>
    <?php endif; ?></td>       
          
   <td><?php echo date("Y-m-d",$this->_var['c']['dateline']); ?></td>
   
    
    <td>	<?php if ($this->_var['c']['status'] != 2): ?>
           <img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo $this->_var['appadmin']; ?>?m=shop&a=status&shopid=<?php echo $this->_var['c']['shopid']; ?>&status=2" rurl="<?php echo $this->_var['appadmin']; ?>?m=shop&a=status&shopid=<?php echo $this->_var['c']['shopid']; ?>&status=4" /> 
          <?php else: ?>
           <img src="/static/images/yes.gif" class="ajax_no"  rurl="<?php echo $this->_var['appadmin']; ?>?m=shop&a=status&shopid=<?php echo $this->_var['c']['shopid']; ?>&status=2" url="<?php echo $this->_var['appadmin']; ?>?m=shop&a=status&shopid=<?php echo $this->_var['c']['shopid']; ?>&status=4" /> 
          <?php endif; ?></td>
   
<td align="center"><a href="<?php echo $this->_var['appadmin']; ?>?m=shop&a=add&shopid=<?php echo $this->_var['c']['shopid']; ?>">编辑</a>  
<a href="<?php echo $this->_var['appshop']; ?>?m=login&a=admin&shopid=<?php echo $this->_var['c']['shopid']; ?>" target="_blank">去管理</a><br /> 
<a href="<?php echo $this->_var['appadmin']; ?>?m=shopadmin&shopid=<?php echo $this->_var['c']['shopid']; ?>">管理员管理</a>
<a href="javascript:;" class="delete" url="<?php echo $this->_var['appadmin']; ?>?m=shop&a=delete&shopid=<?php echo $this->_var['c']['shopid']; ?>">删除</a></td>
  </tr>
   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
 </table>
<div><?php echo $this->_var['pagelist']; ?></div>
</div>
</div>
<?php echo $this->fetch('footer.html'); ?>